<template>
    <el-form>
        <el-button @click="handleChangeNum">查看</el-button>
    <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number>

    <p>禁用状态</p>
    <el-input-number v-model="num" :disabled="true"></el-input-number>

    <p>步数</p>
    <el-input-number v-model="num" :step="2"></el-input-number>

    <p>严格步数</p>
    <el-input-number v-model="num1" :step="2" step-strictly  ></el-input-number>

    <p>精度</p>
    <el-input-number v-model="num" :precision="3" :step="0.1" :max="10" ></el-input-number>
    
    <p>尺寸</p>
    <el-form-item>
        <el-input-number v-model="num1"></el-input-number>
        <el-input-number size="medium" v-model="num2"></el-input-number>
        <el-input-number size="small" v-model="num3"></el-input-number>
        <el-input-number size="mini" v-model="num4"></el-input-number>
    </el-form-item>
    <p>按钮位置</p>
    <el-input-number v-model="num" controls-position="right" @change="handleChange" :min="1" :max="10"></el-input-number>
  </el-form>
</template>

<script>
    export default{
        data(){
            return{
                num:1,
                num1: 1,
                num2: 1,
                num3: 1,
                num4: 1
            };
        },
        methods:{
            handleChangeNum(){
                console.log(this.num1);
            },
            handleChange(val){
                console.log(val);
            }
        }
    };


</script>